package com.audio.record.app;

import com.audio.record.AudioRecorder;

/**
 * 启动类
 *
 * @author sam
 */
public class AudioRecordApp {
    public static void main(String[] args) throws InterruptedException {
        // 新建录音线程，存入record.wav文件里
        // 检查电脑有没有麦克风权限等...
        AudioRecorder audioRecorder = new AudioRecorder("record.wav");
        audioRecorder.start();
        Thread.sleep(10000);
        audioRecorder.stopRecording();

        audioRecorder.play("record.wav");
        /**tips*/
        // 如果播放速度过快，可调整new AudioFormat()里面的参数;
    }
}
